/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const productRouter = {
    path: '/product',
    component: Layout,
    redirect: '/product/brandMannager/list',
    name: 'Product',
    meta: {
        title: '产品管理',
        icon: 'form'
    },
    children: [{
            path: 'category/list',
            component: () =>
                import ('@/views/product/category/list'),
            name: 'CateList',
            meta: { title: '分类列表', noCache: true }
        },
        {
            path: 'category/create',
            component: () =>
                import ('@/views/product/category/create'),
            name: 'CreateCate',
            meta: { title: '创建分类', activeMenu: '/product/category/list' },
            hidden: true
        },
        {
            path: 'category/edit/:id(\\d+)',
            component: () =>
                import ('@/views/product/category/edit'),
            name: 'EditCate',
            meta: { title: '编辑分类', noCache: true, activeMenu: '/product/category/list' },
            hidden: true
        },
        {
            path: 'productManager/list',
            component: () =>
                import ('@/views/product/productManager/list'),
            name: 'ProductList',
            meta: { title: '产品列表', noCache: true }
        },
        {
            path: 'productManager/create',
            component: () =>
                import ('@/views/product/productManager/create'),
            name: 'CreateProduct',
            meta: { title: '创建产品', activeMenu: '/product/productManager/list' },
            hidden: true
        },
        {
            path: 'productManager/edit/:id(\\d+)',
            component: () =>
                import ('@/views/product/productManager/edit'),
            name: 'EditProduct',
            meta: { title: '编辑产品', noCache: true, activeMenu: '/product/productManager/list' },
            hidden: true
        },
    ]
}
export default productRouter